package com.risk.web.controller.leakage;

import com.alibaba.fastjson2.JSON;
import com.risk.kernel.service.DsCallRecordService;
import com.risk.kernel.service.IDsTripartiteAgreementService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpEntity;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author: Liwen
 * @createTime: 2024/12/2
 * @description:
 */

@RestController
@RequestMapping(value = "/leakage/visit")
@Api("暴漏三方mock接口")
public class LeakageVisitController {

    @Autowired
    private DsCallRecordService recordService;

    @PostMapping(value = "/mk")
    @ApiOperation("查询")
    public String getRepMk(@RequestBody String reqInfo) {
        return recordService.getRepMessage(reqInfo);
    }

    @PostMapping(value = "/mk/decision")
    @ApiOperation("红线决策引擎查询")
    public String getRepDecisionMk(@RequestParam Map<String, Object> reqInfo) {
        return recordService.getRepMessage(JSON.toJSONString(reqInfo));
    }

    @PostMapping(value = "/mk/wg")
    @ApiOperation("网关查询")
    public String getServiceCode(String serviceCode) {
        System.out.println("=============================");
        return recordService.getServiceCode(serviceCode);
    }


}
